home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / icons / newiconsv3 / install / install_newicons < prev    next >
Text File  |  1996-07-14  |  18KB  |  623 lines

  1. ; NewIcons 2.0 Installer Script
  2. ; $Ver: 39.1 (13-Jul-96)
  3. ; Written by Phil Vedovatti
  4. ; Brought to you by the NewIcons Team
  5.  
  6. (set @default-dest "SYS:C")
  7.  
  8. (set cpu (database "cpu"))
  9. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  10. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  11.  
  12. (set #bad-kick
  13.    (cat "\n\nSorry! You must have Workbench 2.0 or"
  14.         "higher to to use this package."))
  15.  
  16. (set #hello-message
  17.    (cat "\n\nThank you for trying NewIcons, the revolutionary"
  18.         "\nGraphical User Interface system for the Amiga."
  19.         "\nPlease read the documentation to get the most out"
  20.         "\nof this package.  Nothing will be deleted from your"
  21.         "\nsystem with this installation program.  Your old WB"
  22.         "\nicons will still be there, even though it won't look"
  23.         "\nlike it on your screen.  If you don't understand any"
  24.         "\npart of the installation, click on the \"Help\" gadget"
  25.         "\nfound throughout the installation for more information."
  26.         "\n\nCLICK TO PROCEED"))
  27.  
  28. (set #install-which
  29.    (cat "\nWhich part(s) of the NewIcons System would"
  30.         "\nyou like to install onto your hard drive?\n"))
  31.  
  32. (set #install-library
  33.    (cat "\n\nInstalling NewIcon.library to LIBS:."))
  34.  
  35. (set #install-library-help
  36.    (cat "\n\nThis library is required to use NewIcons."))
  37.  
  38. (set #install-newicons
  39.    (cat "\n\nCopying the NewIcons executable file"
  40.         "\n and support files to C:"))
  41.  
  42. (set #install-newicons-help
  43.    (cat "\n\nThis section installs NewIcons, InjectBrush"
  44.         "\nand PatchOpenWB to your C: directory."))
  45.  
  46. (set #install-icons
  47.    (cat "\n\nInstalling the NewIcons icon images to your"
  48.         "\nSYS: partition."
  49.         "\n\nYour old icons will NOT be removed."
  50.         "\n\nNOTE: make sure you have the standard Amiga 'list'"
  51.         "\ncommand in your command path before proceeding."
  52.         "\n\nInstalling may take some time...patience."))
  53.  
  54. (set #install-icons-help
  55.    (cat "\n\nThe new icon images will be embedded in"
  56.         "\nthe tool types of your existing .info"
  57.         "\nfiles.  The tooltype lines will be"
  58.         "\ninvisible once NewIcons is running"
  59.         "\nso operation will be totally transparent"
  60.         "\nto the user."))
  61.  
  62. (set #tools-dest
  63.    (cat "\nWhich drawer would you like the NewIcon"
  64.         "\nmanipulation utilities to be installed?"
  65.         "\nA drawer will NOT be created."))
  66.  
  67. (set #install-prefs
  68.    (cat "\nInstalling NewIconsPrefs to your"
  69.         "\nSys:prefs directory."))
  70.  
  71. (set #install-prefs-help
  72.    (cat "\nUse this program to configure NewIcons!"))
  73.  
  74. (set #install-classes
  75.    (cat "\n\nInstalling the ClassAct classes to your"
  76.         "\nyour SYS:Classes directory."))
  77.  
  78. (set #install-classes-help
  79.    (cat "\nThis section installs the ClassAct images"
  80.         "\n(which are required for NewIconsPrefs) to your"
  81.         "\nSys:Classes directory."))
  82.  
  83. (set #run-prefs
  84.    (cat "\nStarting NewIconsPrefs so you can configure"
  85.         "\nNewicons right away. The effect will not be"
  86.         "\nevident until you reboot."))
  87.  
  88. (set #startup-change
  89.    (cat "\nNewIcons V3.0 requires a change in"
  90.         "\nyour user startup to launch it.  Shall I add"
  91.         "\n\n'Run <NIL: >NIL: c:NewIcons'"
  92.         "\n\nto your S:user-startup file?"
  93.         "\n\n(You may need to remove the old line manually"
  94.         "\nif you didn't originally install NewIcons"
  95.         "\nusing the Installer utility.)"))
  96.  
  97. (set #install-deficons
  98.    (cat "\n\nInstalling the DefIcons daemon to your"
  99.         "\nC: directory, and copying default icons"
  100.         "\nto your Envarc:sys directory."))
  101.  
  102. (set #install-deficons-help
  103.    (cat "\nThis sections installs the Deficons program"
  104.         "\nand copies the required def_icons to your"
  105.         "\nENVARC: directory."))
  106.  
  107. (set #move-olddefs-dir
  108.    (cat "The installer will move your old default"
  109.         "\nicons to another location for safe keeping."
  110.         "\nWhere would you like me to create a directory"
  111.         "\nto put them in?"))
  112.  
  113. (set #move-olddefs-help
  114.    (cat "\nThis section copies your old default icons to"
  115.         "\na safe place instead of overwriting them."
  116.         "\nShould you wish to deinstall Deficons, you"
  117.         "\nWill have them available to restore."))
  118.  
  119. (set #move-olddefs
  120.    (cat "Moving your old default icons to \n"
  121.         destdir))
  122.  
  123. (set #install-envarc
  124.    (cat "\nCopying the default icons and brainfile"
  125.         "\nto ENVARC: so DefIcons can use them.\n"))
  126.  
  127. (set #install-envarc-help
  128.    (cat "\n\nThis section install the icons that DefIcons"
  129.         "\nwill use to display icon images for files that"
  130.         "\ndon't have icons already attached to them."))
  131.  
  132. (set #startup-deficons
  133.    (cat "\n\nAdding a line to your S:user-Startup file"
  134.         "\nto launch DefIcons whenever the system"
  135.         "\nis booted up."))
  136.  
  137. (set #powb-message
  138.    (cat "\n\nIf you have installed NewIcons, you must "
  139.            "add a line to your S:Startup-Sequence:\n\n"
  140.            "C:PatchOpenWB\n"
  141.            "\nto fix a bug in the 3.x operating system!"
  142.            "\n\n Make sure to place the line after Setpatch"
  143.            "\nand before IPrefs."))
  144.  
  145. (set #docs-dest
  146.    (cat "Where would you like the NewIcons Documentation"
  147.         "\nGuide to be installed?"))
  148.  
  149.  
  150. (set #exit-message
  151.    (cat "Please reboot your system to fully activate\n"
  152.         "the new NewIcons System."
  153.         "\n\n\nWe hope you enjoy this package!"))
  154.  
  155.  
  156. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  157.  
  158. ; percentage of the size of included ClassAct classes versus the whole
  159. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  160.  
  161. (set classact-complete 70)
  162.  
  163. ; ClassAct installer scripts
  164. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  165. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  166.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  167.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  168.         )
  169.     )
  170. )
  171. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  172. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  173. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  174. (set #creating-dir "Creating directory ")
  175. (set #usbackup-prompt "User-Startup will now be backed up.")
  176. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  177. (set #adding-1 "Adding ")
  178. (set #adding-2 " to LIBS: assign\n")
  179. (set #adding-help "This is necessary so that the custom classes can be found.")
  180. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  181. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  182. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  183. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  184. (set #caprefs-startup-1 "Adding the command\n\n")
  185. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  186.  
  187. (procedure install-classact
  188. (debug "classact")
  189. ; call this procedure to copy the classes included in the Classes directory
  190. ; in your distribution dir.
  191.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  192.     (
  193.         (set comp-dest  (/ (* classact-complete 5) 10))
  194.         (set comp-libs  (/ (* classact-complete 5) 10))
  195.         (set comp-dirs  (/ (* classact-complete 6) 10))
  196.         (set comp-junod (/ (* classact-complete 6) 10))
  197.         (set comp-020   (/ (* classact-complete 7) 10))
  198.         (set comp-gad   (/ (* classact-complete 7) 10))
  199.         (set comp-im    (/ (* classact-complete 8) 10))
  200.         (set comp-prefs (/ (* classact-complete 9) 10))
  201.  
  202.         ; has the user installed ClassAct in CLASSACT: ?
  203.         (set @classact-dest (getassign "CLASSACT" "A"))
  204.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  205.  
  206.         ; is ClassAct already in SYS:Classes ?
  207.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  208.                 (= @user-level 2))
  209.             ; no, ask where it should be placed
  210.             (set @classact-dest
  211.                 (askdir
  212.                     (prompt #classdest-prompt)
  213.                     (help #classdest-help)
  214.                     (default @classact-dest)
  215.                     (newpath)
  216.                 )
  217.             )
  218.         )
  219.  
  220.         (complete comp-dest)
  221.  
  222.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  223.             (
  224.                 (message #noclasses-message)
  225.                 (if (not (exists @classact-dest))
  226.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  227.                 )
  228.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  229.                 (startup "CLASSACT"
  230.                     (command @addassign)
  231.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  232.                     (help #adding-help)
  233.                 )
  234.                 (run (@addassign))
  235.             )
  236.         )
  237.  
  238.         (complete comp-libs)
  239.  
  240.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  241.         (set @classact-images (tackon @classact-dest "Images"))
  242.  
  243.         (if (not (exists @classact-gadgets (noreq)))
  244.             (makedir @classact-images
  245.                 (prompt (cat #creating-dir @classact-gadgets))
  246.             )
  247.         )
  248.  
  249.         (if (not (exists @classact-images (noreq)))
  250.             (makedir @classact-images
  251.                 (prompt (cat #creating-dir @classact-images))
  252.             )
  253.         )
  254.  
  255.         (complete comp-dirs)
  256.  
  257.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  258.             (if (< 40 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  259.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  260.                     (
  261.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  262.                         (message #junod-backed)
  263.                     )
  264.                     (message #junod-kept)
  265.                 )
  266.             )
  267.         )
  268.  
  269.         (complete comp-junod)
  270.  
  271.         (if (exists "Classes/Gadgets/layout.gadget.020")
  272.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  273.             (set classes-020 0)
  274.         )
  275.  
  276.         (complete comp-020)
  277.  
  278.         (foreach "Classes/Gadgets" "#?.gadget"
  279.             (
  280.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  281.                 (if (and classes-020 (exists (cat thislib ".020")))
  282.                     (set thislib (cat thislib ".020"))
  283.                 )
  284.                 (copylib (source thislib)
  285.                     (dest @classact-gadgets)
  286.                     (newname @each-name)
  287.                     (prompt (cat #installing @each-name))
  288.                     (help #classdest-help)
  289.                     (optional "force" "askuser")
  290.                 )
  291.             )
  292.         )
  293.  
  294.         (complete comp-gad)
  295.  
  296.         (foreach "Classes/Images" "#?.image"
  297.             (
  298.                 (set thislib (tackon "Classes/Images" @each-name))
  299.                 (if (and classes-020 (exists (cat thislib ".020")))
  300.                     (set thislib (cat thislib ".020"))
  301.                 )
  302.                 (copylib (source thislib)
  303.                     (dest @classact-images)
  304.                     (newname @each-name)
  305.                     (prompt (cat #installing @each-name))
  306.                     (help #classdest-help)
  307.                     (optional "force" "askuser")
  308.                 )
  309.             )
  310.         )
  311.  
  312.         (complete comp-im)
  313.  
  314.         (foreach "Classes" "#?.class"
  315.             (
  316.                 (set thislib (tackon "Classes" @each-name))
  317.                 (if (and classes-020 (exists (cat thislib ".020")))
  318.                     (set thislib (cat thislib ".020"))
  319.                 )
  320.                 (copylib (source thislib)
  321.                     (dest @classact-dest)
  322.                     (newname @each-name)
  323.                     (prompt (cat #installing @each-name))
  324.                     (help #classdest-help)
  325.                     (optional "force" "askuser")
  326.                 )
  327.             )
  328.         )
  329.     )
  330.     )
  331.     (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  332.     (
  333.         (message #caprefs-message)
  334.  
  335.         (copylib (source "Prefs/CAPrefs")
  336.             (dest "C:")
  337.             (prompt (cat #installing "CAPrefs"))
  338.         )
  339.         (copylib (source "Prefs/ClassAct")
  340.             (dest "SYS:Prefs")
  341.             (prompt (cat #installing "ClassAct Prefs"))
  342.             (infos)
  343.         )
  344.  
  345.         (complete comp-prefs)
  346.  
  347.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  348.             (
  349.                 (makedir "ENVARC:ClassAct"
  350.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  351.                 )
  352.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  353.                     (append "")
  354.                 )
  355.             )
  356.         )
  357.  
  358.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  359.  
  360.         (startup "CAPREFS"
  361.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  362.             (help #caprefs-message)
  363.             (command caprefs-cmd)
  364.         )
  365.     )
  366.     )
  367.  
  368.     (complete classact-complete)
  369. )
  370.  
  371.  
  372.  
  373.  
  374. ; ------------------------------
  375. ; Check Kickstart Version
  376. ; ------------------------------
  377.  
  378.  
  379.  (if (< (getversion "LIBS:version.library") (* 37 65536))
  380.         (abort #bad-kick)
  381.  )
  382.  
  383. (message #hello-message)
  384.  
  385.  
  386. ; ------------------------------
  387. ; What should I install?
  388. ; ------------------------------
  389. (complete 0)
  390. (set InstallOpt
  391.       (askoptions (prompt #install-which)
  392.                   (help @askoptions-help)
  393.                   (choices "NewIcons" "DefIcons" "Documentation")
  394.       )
  395. )
  396.  
  397.  
  398. ; ------------------------------
  399. ; Install NewIcon.library
  400. ; ------------------------------
  401.  
  402. (complete 10)
  403. (if ((patmatch (database "cpu") ("68000|68010")
  404.      )
  405.     )
  406.       (copylib
  407.            (source "/libs/000/newicon.library")
  408.            (dest "libs:")
  409.            (prompt #install-library)
  410.            (help #install-library-help)
  411.            (confirm)
  412.       )
  413.  
  414.       (if (>= (getversion "LIBS:version.library") (* 39 65536)
  415.           )
  416.  
  417.            (copylib
  418.                 (source "/libs/020-V39/newicon.library")
  419.                 (dest "libs:")
  420.                 (prompt #install-library)
  421.                 (help #install-library-help)
  422.                 (confirm)
  423.            )
  424.            (copylib
  425.                 (source "/libs/000/newicon.library")
  426.                 (dest "libs:")
  427.                 (prompt #install-library)
  428.                 (help #install-library-help)
  429.                 (confirm)
  430.            )
  431.       )
  432. )
  433.  
  434. ;--------------------------------------------------------
  435. ; Install NewIcons, icon images, and icon support files
  436. ;--------------------------------------------------------
  437.  
  438. (complete 20)
  439. (if (BITAND InstallOpt 1)
  440.  
  441.   ((message #install-icons)
  442.  
  443.    (execute "Install_Icons"
  444.       (help #install-icons-help)
  445.    )
  446.  
  447.    (complete 25)
  448.  
  449.    (copylib
  450.       (prompt #install-newicons)
  451.       (source "/C/NewIcons")
  452.       (dest "c:")
  453.       (help #install-newicons-help)
  454.    )
  455.  
  456.    (copylib
  457.       (source "/C/InjectBrush")
  458.       (dest "c:")
  459.    )
  460.  
  461.    (copylib
  462.       (source "/C/PatchOpenWB")
  463.       (dest "c:")
  464.    )
  465.  
  466.    (complete 30)
  467.  
  468.    (set destdir
  469.       (askdir
  470.             (prompt #tools-dest)
  471.             (help @askdir-help)
  472.             (default "Sys:Utilities")
  473.       )
  474.    )
  475.  
  476.    (copyfiles
  477.       (source "/Utilities/CopyNewIcon")
  478.       (dest destdir)
  479.       (infos)
  480.    )
  481.  
  482.    (copyfiles
  483.       (source "/Utilities/CreateDefaultIcon")
  484.       (dest destdir)
  485.       (infos)
  486.    )
  487.  
  488.    (copyfiles
  489.       (source "/Utilities/KillNewIcon")
  490.       (dest destdir)
  491.       (infos)
  492.    )
  493.  
  494.    (complete 35)
  495.  
  496.    (startup "NewIcons"
  497.       (prompt #startup-change)
  498.       (command "Run <NIL: >NIL: c:NewIcons")
  499.       (help @startup-help)
  500.    )
  501.  
  502.  
  503.    (copylib
  504.       (prompt #install-prefs)
  505.       (source "/prefs/NewIconsPrefs")
  506.       (dest "Sys:prefs")
  507.       (help #install-prefs-help)
  508.       (confirm)
  509.       (infos)
  510.    )
  511.  
  512.  
  513.  
  514.  
  515. ;------------------------------
  516. ;Install ClassAct classes
  517. ;------------------------------
  518.  
  519. ;   (message #install-classes
  520. ;      (help #install-classes-help)
  521. ;   )
  522.    (install-classact)
  523.   )
  524. )
  525. ;------------------------------
  526. ;Install Deficons
  527. ;------------------------------
  528. (complete 75)
  529. (if (BITAND InstallOpt 2)
  530.  
  531.  
  532.   ((set destdir
  533.       (askdir
  534.            (prompt #move-olddefs-dir)
  535.            (help #move-olddefs-help)
  536.            (default "Sys:Storage")
  537.       )
  538.    )
  539.  
  540.    (set destdir
  541.       (tackon destdir "Old_Def_icons")
  542.    )
  543.  
  544.    (makedir destdir
  545.    )
  546.  
  547.    (complete 80)
  548.  
  549.    (copyfiles
  550.       (prompt #move-olddefs)
  551.       (source "Envarc:sys")
  552.       (dest destdir)
  553.       (pattern "def#?")
  554.       (help #move-olddefs-help)
  555.    )
  556.  
  557.    (copylib
  558.       (prompt #install-deficons)
  559.       (source "/C/DefIcons")
  560.       (dest "C:")
  561.       (help #install-deficons-help)
  562.       (confirm)
  563.    )
  564.  
  565.    (copyfiles
  566.       (prompt #install-envarc)
  567.       (source "/envarc")
  568.       (dest "ENVARC:")
  569.       (all)
  570.       (infos)
  571.       (help #install-envarc-help)
  572.    )
  573.  
  574.    (startup "DefIcons"
  575.       (prompt #startup-deficons)
  576.       (command "DefIcons")
  577.       (help @startup-help)
  578.    )
  579.   )
  580. )
  581.  
  582.  
  583. ;------------------------------
  584. ;Install Documentation
  585. ;------------------------------
  586. (complete 90)
  587. (if (BITAND InstallOpt 4)
  588.  
  589.    ((set destdir
  590.       (askdir
  591.             (prompt #docs-dest)
  592.             (help @askdir-help)
  593.             (default "Help:")
  594.       )
  595.     )
  596.     (copyfiles
  597.       (source "/NewIcons.guide")
  598.       (dest destdir)
  599.       (infos)
  600.     )
  601.    )
  602. )
  603.  
  604.  
  605. ;------------------------------
  606. ;Run NIPrefs
  607. ;------------------------------
  608.  
  609. (complete 95)
  610. (run "/prefs/NewIconsPrefs"
  611.       (prompt #run-prefs)
  612.       (help "This lets you configure NewIcons.")
  613.       (confirm)
  614.       (safe)
  615. )
  616.  
  617. (run "Sys:Utilities/Multiview /NewIcons.guide"
  618.       (safe)
  619. )
  620. (complete 99)
  621. (message #powb-message)
  622. (complete 100)
  623. (exit #exit-message)